package com.earthea.application.system.domain.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.earthea.application.common.entity.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 参数配置表 sys_config
 */
@Getter
@Setter
public class SysConfig extends BaseEntity {
    @ExcelIgnore
    private Long configId;

    /**
     * 参数名称
     */
    @ColumnWidth(30)
    @ExcelProperty("名称")
    private String configName;

    /**
     * 参数键名
     */
    @ColumnWidth(30)
    @ExcelProperty("参数键")
    private String configKey;

    /**
     * 参数键值
     */
    @ColumnWidth(20)
    @ExcelProperty("参数值")
    private String configValue;

    /**
     * 参数类型(Y：系统配置，N：自定义配置)
     * 系统配置不支持删除，系统配置通过预置SQL新增
     */
    @ExcelIgnore
    private String configType;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("configId", getConfigId()).append("configName", getConfigName()).append("configKey", getConfigKey()).append("configValue", getConfigValue()).append("configType", getConfigType()).append("createBy", getCreateBy()).append("createTime", getCreateTime()).append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).append("remark", getRemark()).toString();
    }
}
